/*
 * @ author madman
 * @ use 用户相关API
 */
import request from '@/utils/request';
class User {
  static login(username, password) {
    return request({
      url: '/system/login',
      method: 'post',
      data: {
        username,
        password
      }
    });
  }
  static getInfo(uid) {
    return request({
      url: '/system/info',
      method: 'get',
      params: { uid }
    });
  }
  static getPower(uid) {
    return request({
      url: '/system/power',
      method: 'get',
      params: { uid }
    });
  }
  static logout(uid) {
    return request({
      url: '/system/logout',
      method: 'get',
      params: { uid }
    });
  }
}
export default User;
